<?php
/**
 * XuYuan Project
 *
 * @package	XueYuan 
 * @author	Jiuchi Team
 * @since	Version 1.0.0
 * @filesource
 */
defined('BASEPATH') OR exit('No direct script access allowed');
/**
 * Topic model class
 * @author Wayne Yu
 */
class Comment_model extends Jiuchi_Model{
	/**
	 * Construct function
	 */
	public function __construct() {
		parent::__construct();
		$this->table = 'comments';
	}
	
	public function getTopicComments($topicId, $pageSize = 0, $lastItem = 0){
		$count = -1;
		return $this->retrieve($count, $pageSize, $lastItem, NULL, array('topic_id' => $topicId), NULL, NULL, NULL, array());
	}
}